package com.baizhi.cmfz;

import org.apache.activemq.command.ActiveMQQueue;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import javax.jms.Queue;

@SpringBootApplication
@MapperScan("com.baizhi.cmfz.dao")
@EnableTransactionManagement
public class CmfzdemoApplication extends SpringBootServletInitializer {
	public static void main(String[] args) {
		SpringApplication.run(CmfzdemoApplication.class, args);
	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		return builder.sources(CmfzdemoApplication.class);
	}

	@Bean
	public Queue queue(){
		return new ActiveMQQueue("cmfz-log");
	}

}
